﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ca2simulator.shared;

namespace ca2simulator.client.model.transfer.generator
{
    class RandomTransfer : ITransferFunc
    {
        static readonly Random rand = new Random();
        public CellState NextState(Lattice lattice, int r, int c)
        {
            CellState nextState = new CellState();
            if (rand.NextDouble()>0.5) nextState.State = 1;
            else nextState.State = 0;
            return nextState;
        }
    }
    class StaticTransfer : ITransferFunc
    {
        
        public CellState NextState(Lattice lattice, int r, int c)
        {
            CellState nextState = new CellState();
            //if (lattice.Cells[r,c].CellState.State==0) nextState.State = 1;
            //else nextState.State = 0;
            nextState.State = 1;
            return nextState;
        }
    }
    
}
